/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NewSRTemplate.java
 *
 * Created on 23/09/2009, 09:53:46 AM
 */

package com.sabre.hd.gui;

import com.sabre.hd.easysr.Facade;
import javax.swing.DefaultListModel;
import javax.swing.JOptionPane;
import com.sabre.hd.easysr.entities.*;
import com.sabre.hd.easysr.Facade.*;
import java.util.ArrayList;
/**
 *
 * @author SG0894180
 */
public class NewSRTemplate extends javax.swing.JFrame {

    /** Creates new form NewSRTemplate */
    public NewSRTemplate() {
        initComponents();
        loadSRTemplates();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        btnSave = new javax.swing.JButton();
        btnLoad = new javax.swing.JButton();
        btnNew = new javax.swing.JButton();
        btnClose = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel2 = new javax.swing.JPanel();
        cmbBusinessUnit = new javax.swing.JComboBox();
        cmbSystem = new javax.swing.JComboBox();
        scrollSRList = new javax.swing.JScrollPane();
        txtRequestOverview = new javax.swing.JTextArea();
        txtPrimaveraId = new javax.swing.JTextField();
        txtFRCRId = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        txtSEDIId = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        txtRequestTitle = new javax.swing.JTextField();
        txtSRName = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        lBgImage = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();
        txtVP = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        txtRequestor = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        txtImplDate = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        txtRequirements = new javax.swing.JTextArea();
        jLabel9 = new javax.swing.JLabel();
        txtSabrePR = new javax.swing.JTextField();
        txtOwningCostCenter = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        txtFundingCostCenter = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        txtSabreAR = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        chkRequestorLoggedUser = new javax.swing.JCheckBox();
        chkImplDateASAP = new javax.swing.JCheckBox();
        jPanel1 = new javax.swing.JPanel();
        chkEDSAlreadyEngaged = new javax.swing.JCheckBox();
        chkRequireOfficeOpening = new javax.swing.JCheckBox();
        chkRequireIncreaseTransactions = new javax.swing.JCheckBox();
        chkRequireSecurityException = new javax.swing.JCheckBox();
        chkRequireReport = new javax.swing.JCheckBox();
        chkRequireFirewallChange = new javax.swing.JCheckBox();
        chkImpactHost = new javax.swing.JCheckBox();
        chkRequireNewCircuit = new javax.swing.JCheckBox();
        chkRequireWebHosting = new javax.swing.JCheckBox();
        chkCRUDActiveDirectory = new javax.swing.JCheckBox();
        chkRequireSSL = new javax.swing.JCheckBox();
        chkRequireAccess2VAR = new javax.swing.JCheckBox();
        chkRequireB2BVPN = new javax.swing.JCheckBox();
        chkRequireApplicationChange = new javax.swing.JCheckBox();
        chkInvolvePCI = new javax.swing.JCheckBox();
        chkRequireHardware = new javax.swing.JCheckBox();
        chkRequireStorage = new javax.swing.JCheckBox();
        chkRequireNewSoftware = new javax.swing.JCheckBox();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        srTemplatesList = new DefaultListModel();
        lstSRTemplates = new javax.swing.JList(srTemplatesList);

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setFont(new java.awt.Font("Verdana", 0, 10));

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLabel1.setText("New SR Template");

        btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/sabre/hd/resources/images/disk.png"))); // NOI18N
        btnSave.setText("Save");
        btnSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaveActionPerformed(evt);
            }
        });

        btnLoad.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/sabre/hd/resources/images/folder_add.png"))); // NOI18N
        btnLoad.setText("Load");
        btnLoad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLoadActionPerformed(evt);
            }
        });

        btnNew.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/sabre/hd/resources/images/page.png"))); // NOI18N
        btnNew.setText("New");
        btnNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNewActionPerformed(evt);
            }
        });

        btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/sabre/hd/resources/images/cancel.png"))); // NOI18N
        btnClose.setText("Close");
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/sabre/hd/resources/images/page_code.png"))); // NOI18N
        jButton1.setText("Execute Workflow");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnSave, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
                    .addComponent(btnLoad, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
                    .addComponent(btnNew, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
                    .addComponent(btnClose, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnSave)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnLoad)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnNew)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnClose)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        cmbBusinessUnit.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Airline Solutions" }));

        cmbSystem.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "eMergo" }));

        txtRequestOverview.setColumns(20);
        txtRequestOverview.setRows(5);
        scrollSRList.setViewportView(txtRequestOverview);

        jLabel10.setText("FRCR #");

        jLabel11.setText("SEDI #");

        jLabel7.setText("Primavera ID");

        jLabel6.setText("Business Unit");

        jLabel5.setText("System");

        jLabel4.setText("Request Overview");

        jLabel3.setText("Request Title");

        txtRequestTitle.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtRequestTitleActionPerformed(evt);
            }
        });

        txtSRName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtSRNameActionPerformed(evt);
            }
        });

        jLabel18.setText("SR Name");

        lBgImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/sabre/hd/resources/images/2.png"))); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtRequestTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(cmbBusinessUnit, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(cmbSystem, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtPrimaveraId, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(scrollSRList, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtFRCRId, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtSEDIId, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(txtSRName, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(36, 36, 36)
                        .addComponent(lBgImage)))
                .addContainerGap(21, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(txtSRName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(txtRequestTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(scrollSRList, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cmbBusinessUnit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cmbSystem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtPrimaveraId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(txtFRCRId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(txtSEDIId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)
                .addComponent(lBgImage, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Request Info", jPanel2);

        jLabel15.setText("VP/Senior Vp");

        jLabel14.setText("Funding Cost Center");

        jLabel16.setText("Requirements");

        txtRequirements.setColumns(20);
        txtRequirements.setRows(5);
        jScrollPane2.setViewportView(txtRequirements);

        jLabel9.setText("Sabre PR");

        jLabel12.setText("Owning Cost Center");

        jLabel13.setText("Requestor");

        jLabel8.setText("Sabre AR");

        jLabel17.setText("Impl. Date");

        chkRequestorLoggedUser.setText("Logged User");
        chkRequestorLoggedUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkRequestorLoggedUserActionPerformed(evt);
            }
        });

        chkImplDateASAP.setText("ASAP");
        chkImplDateASAP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkImplDateASAPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtRequestor, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtFundingCostCenter, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtOwningCostCenter, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkRequestorLoggedUser)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtSabreAR, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtSabrePR, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtVP, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(chkImplDateASAP)
                            .addComponent(txtImplDate, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(15, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(txtSabreAR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(txtSabrePR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(3, 3, 3)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(txtOwningCostCenter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(txtFundingCostCenter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(txtRequestor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(3, 3, 3)
                .addComponent(chkRequestorLoggedUser)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(txtVP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(txtImplDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkImplDateASAP)
                .addContainerGap(95, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("CostCenter Info", jPanel3);

        chkEDSAlreadyEngaged.setText("EDS Already Engaged");

        chkRequireOfficeOpening.setText("Require Office Opening");

        chkRequireIncreaseTransactions.setText("Require Increase of transactions");
        chkRequireIncreaseTransactions.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkRequireIncreaseTransactionsActionPerformed(evt);
            }
        });

        chkRequireSecurityException.setText("Require Security Exception");

        chkRequireReport.setText("Require Report");

        chkRequireFirewallChange.setText("Require a Firewall Change");

        chkImpactHost.setText("Impact Host");
        chkImpactHost.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkImpactHostActionPerformed(evt);
            }
        });

        chkRequireNewCircuit.setText("Require new Circuit");

        chkRequireWebHosting.setText("Require a Web Hosting");

        chkCRUDActiveDirectory.setText("CRUD Active Directory");

        chkRequireSSL.setText("Require SSL");

        chkRequireAccess2VAR.setText("Require access to VAR");

        chkRequireB2BVPN.setText("Require B2B VPN");

        chkRequireApplicationChange.setText("Require Application Change");
        chkRequireApplicationChange.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkRequireApplicationChangeActionPerformed(evt);
            }
        });

        chkInvolvePCI.setText("Involve PCI/PII/SPI data");

        chkRequireHardware.setText("Require Hardware");

        chkRequireStorage.setText("Require Storage");

        chkRequireNewSoftware.setText("Require new Sofware");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(chkRequireNewSoftware)
                    .addComponent(chkRequireHardware)
                    .addComponent(chkRequireApplicationChange)
                    .addComponent(chkRequireStorage)
                    .addComponent(chkRequireFirewallChange)
                    .addComponent(chkRequireSecurityException)
                    .addComponent(chkRequireB2BVPN)
                    .addComponent(chkRequireSSL)
                    .addComponent(chkRequireAccess2VAR)
                    .addComponent(chkInvolvePCI)
                    .addComponent(chkRequireIncreaseTransactions)
                    .addComponent(chkRequireWebHosting)
                    .addComponent(chkRequireNewCircuit)
                    .addComponent(chkImpactHost)
                    .addComponent(chkCRUDActiveDirectory)
                    .addComponent(chkRequireReport)
                    .addComponent(chkRequireOfficeOpening)
                    .addComponent(chkEDSAlreadyEngaged))
                .addContainerGap(190, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(chkRequireHardware)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireNewSoftware)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireStorage)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireApplicationChange)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireSecurityException)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireFirewallChange)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireIncreaseTransactions)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkInvolvePCI)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireSSL)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireB2BVPN)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireAccess2VAR)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireWebHosting)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkImpactHost)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireNewCircuit)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireReport)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkCRUDActiveDirectory)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRequireOfficeOpening)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkEDSAlreadyEngaged)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Business Info", jPanel1);

        lstSRTemplates.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        lstSRTemplates.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                lstSRTemplatesValueChanged(evt);
            }
        });
        jScrollPane3.setViewportView(lstSRTemplates);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(24, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 596, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void chkRequestorLoggedUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRequestorLoggedUserActionPerformed
      // TODO add your handling code here:
    }//GEN-LAST:event_chkRequestorLoggedUserActionPerformed

    private void chkImplDateASAPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkImplDateASAPActionPerformed
      // TODO add your handling code here:
    }//GEN-LAST:event_chkImplDateASAPActionPerformed

    private void chkRequireApplicationChangeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRequireApplicationChangeActionPerformed
      // TODO add your handling code here:
    }//GEN-LAST:event_chkRequireApplicationChangeActionPerformed

    private void chkRequireIncreaseTransactionsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRequireIncreaseTransactionsActionPerformed
      // TODO add your handling code here:
    }//GEN-LAST:event_chkRequireIncreaseTransactionsActionPerformed

    private void chkImpactHostActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkImpactHostActionPerformed
      // TODO add your handling code here:
    }//GEN-LAST:event_chkImpactHostActionPerformed

    private void txtRequestTitleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRequestTitleActionPerformed
      // TODO add your handling code here:
    }//GEN-LAST:event_txtRequestTitleActionPerformed

    private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed
      if (saveSRTemplate()) {
        JOptionPane.showMessageDialog(this,
          "Your SR Template was succesfully Saved!",
          "Success",
          JOptionPane.INFORMATION_MESSAGE);
      } else {
        JOptionPane.showMessageDialog(this,
          "Your SR Template could not be saved!",
          "Error",
          JOptionPane.ERROR_MESSAGE);
      }
      loadSRTemplates();
    }//GEN-LAST:event_btnSaveActionPerformed

    private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
      this.dispose();
      this.setVisible(false);
    }//GEN-LAST:event_btnCloseActionPerformed

    private void btnLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoadActionPerformed
      if (lstSRTemplates.getSelectedIndex()==-1) {
        JOptionPane.showMessageDialog(this,
          "Please select an SR Template first!",
          "Error",
          JOptionPane.WARNING_MESSAGE);
      }
      else {
        ServiceRequest unSR = (ServiceRequest) lstSRTemplates.getSelectedValue();
        fillSRFields(unSR);
      }
    }//GEN-LAST:event_btnLoadActionPerformed

    private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewActionPerformed
      if (!cleanSRTemplate()) {
        JOptionPane.showMessageDialog(this,
          "Your SR Template could not be cleaned!",
          "Error",
          JOptionPane.ERROR_MESSAGE);
      }
    }//GEN-LAST:event_btnNewActionPerformed

    private void txtSRNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSRNameActionPerformed
      // TODO add your handling code here:
    }//GEN-LAST:event_txtSRNameActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
      if (lstSRTemplates.getSelectedIndex()==-1) {
        JOptionPane.showMessageDialog(this,
          "Please select an SR Template first!",
          "Error",
          JOptionPane.WARNING_MESSAGE);
      }
      else {
        ServiceRequest aServiceRequest = (ServiceRequest) lstSRTemplates.getSelectedValue();
        Facade.executeSeleniumSR(aServiceRequest);
      }    
}//GEN-LAST:event_jButton1ActionPerformed

    private void lstSRTemplatesValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_lstSRTemplatesValueChanged
      try {
        ServiceRequest unSR = (ServiceRequest) lstSRTemplates.getSelectedValue();
        fillSRFields(unSR);
      } catch (Exception e) {
        
      }        
    }//GEN-LAST:event_lstSRTemplatesValueChanged

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new NewSRTemplate().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnClose;
    private javax.swing.JButton btnLoad;
    private javax.swing.JButton btnNew;
    private javax.swing.JButton btnSave;
    private javax.swing.JCheckBox chkCRUDActiveDirectory;
    private javax.swing.JCheckBox chkEDSAlreadyEngaged;
    private javax.swing.JCheckBox chkImpactHost;
    private javax.swing.JCheckBox chkImplDateASAP;
    private javax.swing.JCheckBox chkInvolvePCI;
    private javax.swing.JCheckBox chkRequestorLoggedUser;
    private javax.swing.JCheckBox chkRequireAccess2VAR;
    private javax.swing.JCheckBox chkRequireApplicationChange;
    private javax.swing.JCheckBox chkRequireB2BVPN;
    private javax.swing.JCheckBox chkRequireFirewallChange;
    private javax.swing.JCheckBox chkRequireHardware;
    private javax.swing.JCheckBox chkRequireIncreaseTransactions;
    private javax.swing.JCheckBox chkRequireNewCircuit;
    private javax.swing.JCheckBox chkRequireNewSoftware;
    private javax.swing.JCheckBox chkRequireOfficeOpening;
    private javax.swing.JCheckBox chkRequireReport;
    private javax.swing.JCheckBox chkRequireSSL;
    private javax.swing.JCheckBox chkRequireSecurityException;
    private javax.swing.JCheckBox chkRequireStorage;
    private javax.swing.JCheckBox chkRequireWebHosting;
    private javax.swing.JComboBox cmbBusinessUnit;
    private javax.swing.JComboBox cmbSystem;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel lBgImage;
    private javax.swing.JList lstSRTemplates;
    private javax.swing.JScrollPane scrollSRList;
    private javax.swing.JTextField txtFRCRId;
    private javax.swing.JTextField txtFundingCostCenter;
    private javax.swing.JTextField txtImplDate;
    private javax.swing.JTextField txtOwningCostCenter;
    private javax.swing.JTextField txtPrimaveraId;
    private javax.swing.JTextArea txtRequestOverview;
    private javax.swing.JTextField txtRequestTitle;
    private javax.swing.JTextField txtRequestor;
    private javax.swing.JTextArea txtRequirements;
    private javax.swing.JTextField txtSEDIId;
    private javax.swing.JTextField txtSRName;
    private javax.swing.JTextField txtSabreAR;
    private javax.swing.JTextField txtSabrePR;
    private javax.swing.JTextField txtVP;
    // End of variables declaration//GEN-END:variables
  private DefaultListModel srTemplatesList = null;
  
  private boolean saveSRTemplate() {
    if (!checkSRFields()) {
      return false;
    }
    ServiceRequest aServiceRequest = fillSRObject();
    if (!Facade.saveSR(aServiceRequest)) {
      
      return false;
    }
    return true;
  }

  private boolean checkSRFields() {
    return true;
  }

  private ServiceRequest fillSRObject() {
    ServiceRequest aServiceRequest = new ServiceRequest();
    aServiceRequest.setName(this.txtSRName.getText());
    aServiceRequest.setRequestTitle(this.txtRequestTitle.getText());
    aServiceRequest.setRequestOverview(this.txtRequestOverview.getText());
    aServiceRequest.setBusinessUnit(this.cmbBusinessUnit.getSelectedItem().toString());
    aServiceRequest.setSystem(this.cmbSystem.getSelectedItem().toString());
    aServiceRequest.setPrimaveraId(this.txtPrimaveraId.getText());
    aServiceRequest.setFRCR(this.txtFRCRId.getText());
    aServiceRequest.setSEDI(this.txtSEDIId.getText());
    aServiceRequest.setSabreAR(this.txtSabreAR.getText());
    aServiceRequest.setSabrePR(this.txtSabrePR.getText());
    aServiceRequest.setOwningCostCenter(this.txtOwningCostCenter.getText());
    aServiceRequest.setFundingCostCenter(this.txtFundingCostCenter.getText());
    aServiceRequest.setRequestor(this.txtRequestor.getText());
    aServiceRequest.setVP(this.txtVP.getText());
    aServiceRequest.setRequirements(this.txtRequirements.getText());
    aServiceRequest.setImplDate(this.txtImplDate.getText());
    aServiceRequest.setCRUDActiveDirectory(this.chkCRUDActiveDirectory.isSelected());
    aServiceRequest.setEDSAlreadyEngaged(this.chkEDSAlreadyEngaged.isSelected());
    aServiceRequest.setImpactHost(this.chkImpactHost.isSelected());
    aServiceRequest.setImplDateASAP(this.chkImplDateASAP.isSelected());
    aServiceRequest.setInvolvePCI(this.chkInvolvePCI.isSelected());
    aServiceRequest.setRequestorLoggedUser(this.chkRequestorLoggedUser.isSelected());
    aServiceRequest.setRequireAccess2VAR(this.chkRequireAccess2VAR.isSelected());
    aServiceRequest.setRequireApplicationChange(this.chkRequireApplicationChange.isSelected());
    aServiceRequest.setRequireB2BVPN(this.chkRequireB2BVPN.isSelected());
    aServiceRequest.setRequireFirewallChange(this.chkRequireFirewallChange.isSelected());
    aServiceRequest.setRequireHardware(this.chkRequireHardware.isSelected());
    aServiceRequest.setRequireIncreaseTransactions(this.chkRequireIncreaseTransactions.isSelected());
    aServiceRequest.setRequireNewCircuit(this.chkRequireNewCircuit.isSelected());
    aServiceRequest.setRequireNewSoftware(this.chkRequireNewSoftware.isSelected());
    aServiceRequest.setRequireOfficeOpening(this.chkRequireOfficeOpening.isSelected());
    aServiceRequest.setRequireReport(this.chkRequireReport.isSelected());
    aServiceRequest.setRequireSSL(this.chkRequireSSL.isSelected());
    aServiceRequest.setRequireSecurityException(this.chkRequireSecurityException.isSelected());
    aServiceRequest.setRequireStorage(this.chkRequireStorage.isSelected());
    aServiceRequest.setRequireWebHosting(this.chkRequireWebHosting.isSelected());
    return aServiceRequest;
  }

  private boolean loadSRTemplates() {
    srTemplatesList.clear();
    ArrayList<ServiceRequest> allServiceRequests = Facade.getAllServiceRequests();
    for (ServiceRequest aServiceRequest : allServiceRequests) {
      srTemplatesList.addElement(aServiceRequest);
    }
    return true;
  }


  private boolean fillSRFields(ServiceRequest aServiceRequest) {
    this.txtSRName.setText(aServiceRequest.getName());
    this.txtRequestTitle.setText(aServiceRequest.getRequestTitle());
    this.txtRequestOverview.setText(aServiceRequest.getRequestOverview());
    this.cmbBusinessUnit.setSelectedItem(aServiceRequest.getBusinessUnit());
    this.cmbSystem.setSelectedItem(aServiceRequest.getSystem());
    this.txtPrimaveraId.setText(aServiceRequest.getPrimaveraId());
    this.txtFRCRId.setText(aServiceRequest.getFRCR());
    this.txtSEDIId.setText(aServiceRequest.getSEDI());
    this.txtSabreAR.setText(aServiceRequest.getSabreAR());
    this.txtSabrePR.setText(aServiceRequest.getSabrePR());
    this.txtOwningCostCenter.setText(aServiceRequest.getOwningCostCenter());
    this.txtFundingCostCenter.setText(aServiceRequest.getFundingCostCenter());
    this.txtRequestor.setText(aServiceRequest.getRequestor());
    this.txtVP.setText(aServiceRequest.getVP());
    this.txtRequirements.setText(aServiceRequest.getRequirements());
    this.txtImplDate.setText(aServiceRequest.getImplDate());
    this.chkCRUDActiveDirectory.setSelected(aServiceRequest.isCRUDActiveDirectory());
    this.chkEDSAlreadyEngaged.setSelected(aServiceRequest.isEDSAlreadyEngaged());
    this.chkImpactHost.setSelected(aServiceRequest.isImpactHost());
    this.chkImplDateASAP.setSelected(aServiceRequest.isImplDateASAP());
    this.chkInvolvePCI.setSelected(aServiceRequest.isInvolvePCI());
    this.chkRequestorLoggedUser.setSelected(aServiceRequest.isRequestorLoggedUser());
    this.chkRequireAccess2VAR.setSelected(aServiceRequest.isRequireAccess2VAR());
    this.chkRequireApplicationChange.setSelected(aServiceRequest.isRequireApplicationChange());
    this.chkRequireB2BVPN.setSelected(aServiceRequest.isRequireB2BVPN());
    this.chkRequireFirewallChange.setSelected(aServiceRequest.isRequireFirewallChange());
    this.chkRequireHardware.setSelected(aServiceRequest.isRequireHardware());
    this.chkRequireIncreaseTransactions.setSelected(aServiceRequest.isRequireIncreaseTransactions());
    this.chkRequireNewCircuit.setSelected(aServiceRequest.isRequireNewCircuit());
    this.chkRequireNewSoftware.setSelected(aServiceRequest.isRequireNewSoftware());
    this.chkRequireOfficeOpening.setSelected(aServiceRequest.isRequireOfficeOpening());
    this.chkRequireReport.setSelected(aServiceRequest.isRequireReport());
    this.chkRequireSSL.setSelected(aServiceRequest.isRequireSSL());
    this.chkRequireSecurityException.setSelected(aServiceRequest.isRequireSecurityException());
    this.chkRequireStorage.setSelected(aServiceRequest.isRequireStorage());
    this.chkRequireWebHosting.setSelected(aServiceRequest.isRequireWebHosting());
    return true;
  }

  private boolean cleanSRTemplate() {
    this.txtSRName.setText("");
    this.txtRequestTitle.setText("");
    this.txtRequestOverview.setText("");
    this.cmbBusinessUnit.setSelectedItem("");
    this.cmbSystem.setSelectedItem("");
    this.txtPrimaveraId.setText("");
    this.txtFRCRId.setText("");
    this.txtSEDIId.setText("");
    this.txtSabreAR.setText("");
    this.txtSabrePR.setText("");
    this.txtOwningCostCenter.setText("");
    this.txtFundingCostCenter.setText("");
    this.txtRequestor.setText("");
    this.txtVP.setText("");
    this.txtRequirements.setText("");
    this.txtImplDate.setText("");
    this.chkCRUDActiveDirectory.setSelected(false);
    this.chkEDSAlreadyEngaged.setSelected(false);
    this.chkImpactHost.setSelected(false);
    this.chkImplDateASAP.setSelected(false);
    this.chkInvolvePCI.setSelected(false);
    this.chkRequestorLoggedUser.setSelected(false);
    this.chkRequireAccess2VAR.setSelected(false);
    this.chkRequireApplicationChange.setSelected(false);
    this.chkRequireB2BVPN.setSelected(false);
    this.chkRequireFirewallChange.setSelected(false);
    this.chkRequireHardware.setSelected(false);
    this.chkRequireIncreaseTransactions.setSelected(false);
    this.chkRequireNewCircuit.setSelected(false);
    this.chkRequireNewSoftware.setSelected(false);
    this.chkRequireOfficeOpening.setSelected(false);
    this.chkRequireReport.setSelected(false);
    this.chkRequireSSL.setSelected(false);
    this.chkRequireSecurityException.setSelected(false);
    this.chkRequireStorage.setSelected(false);
    this.chkRequireWebHosting.setSelected(false);
    return true;

  }

}
